// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
    console.log(1);
    if(event.action=='clear'){
        const db = cloud.database()
        let collect = db.collection("collect_data")
        let re = await collect.where({
            "_openid":event.userInfo.openId
        }).remove();
        return {
            result:re
        }
    }
}